define(function(require, exports){
	var pubjs		= require('pubjs');
	//var baseGrid	= require('@base/highGrid').base;
	var baseGrid    = require('@base/grid').baseNoDate;
	var $			= require('jquery');

	var Base = baseGrid.extend({
		init: function(config){
			config = pubjs.conf(config, {
				'hasTab': false,
				'hasAmount': false,
				'hasExport': false,
				'hasSearch': true,
				'hasSubGrid': false,
				'hasSelect': true,
				'sub_field': '_id',
				'url': 'spot/list',
				'sort': '_id',
				'param': {
					'no_stastic_data': 1
				},
				"cols": [
					//{type:'id'},
					{name: '_id', text:LANG('ID'), width:150}
					,{name:"Name",text:LANG('广告位'),type:"index",render:this.renderName,width:400}
				//],
				//"metrics":[
					,{name:"Size",text:LANG("尺寸"),render:this.renderSize, align: 'center'}
				],
				'pager':{
					"size":12,
					"bounds":5,
					"firstLast":false,
					"showJumper":0,
					"showSizeTypes":0
				},
				'list':{
					'rowSelect': true,
					'scroll_type': 'row',
					'scroll_size': 10
				},
				'reqType': 'websocket'
			});

			this.Super('init', arguments);
		},
		renderSize: function(i,val,row,con){
			if(val) {
				return Math.floor(val/10000) + 'x' + (val % 10000);
			}
			else {
				return '-';
			}
		},
		renderName: function(i,val,row,con){
			return $('<span class="M-tableListWidthLimit" />').width(380).text(val);
		}
	});

	exports.base = Base;

});